
NDK=/home/xlb/tool/android-ndk-r12b 
PREFIX=$NDK/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-
PLATFORM=$NDK/platforms/android-24/arch-arm64 

SRC_DIR=../x264-snapshot-20160627-2245
INSTALL_DIR=../android/x264_out

rm -rf $INSTALL_DIR
cd $SRC_DIR
make clean
  
./configure --prefix=$INSTALL_DIR \
       --host=aarch64-linux-android \
       --sysroot=$PLATFORM \
       --cross-prefix=$PREFIX \
       --extra-cflags="-march=armv8-a -D__ANDROID__" \
       --enable-pic \
       --enable-shared \
       --enable-strip \
       --disable-cli \
       --disable-avs \
       --disable-swscale \
       --disable-lavf \
       --disable-ffms \
       --disable-gpac \
       --disable-lsmash \
       --disable-asm
  
make clean
make -j4 install